import 'package:flutter/widgets.dart';
import 'package:lx_widgets_library/const/constant.dart';

// 设置项前导图标
class SettingLeading extends StatelessWidget {
  final String imgPath;
  final double size;

  const SettingLeading({
    super.key,
    required this.imgPath,
    this.size = 24.0,
  });

  @override
  Widget build(BuildContext context) {
    return _leading();
  }

  Widget _leading() {
    return Padding(
      padding: EdgeInsets.only(right: CONTENT_MARGIN / 2),
      child: Image.asset(
        imgPath,
        width: size,
        height: size,
        fit: BoxFit.contain,
      ),
    );
  }
}
